package com.weilive.platform.coder;

import com.weilive.core.code.writers.ProtoToServerCode;
import com.weilive.core.code.writers.SqlToServerCode;
import com.weilive.core.utils.FileUtils;

public class MyGenerateCodes {

	public static void main(String[] args) throws Exception {

		ProtoToServerCode.MakeProtocol("com/weilive/platform/gate/protobuf/protocol",
				"com.weilive.platform.gate.protobuf.protocol", null, "com.weilive.platform.gate.json.protocol",
				"com.weilive.platform.gate.json.handler");

		SqlToServerCode.writeAtClassDir(FileUtils.getTestResourceDir() + "database/mysql/platform_user.sql",
				"com.weilive.platform.dao.user.mapper");

		SqlToServerCode.writeAtClassDir(FileUtils.getTestResourceDir() + "database/mysql/platform_app.sql",
				"com.weilive.platform.dao.app.mapper");

		SqlToServerCode.writeAtClassDir(FileUtils.getTestResourceDir() + "database/mysql/platform_admin.sql",
				"com.weilive.platform.dao.admin.mapper");

		SqlToServerCode.copyMappers(FileUtils.getClassDir(), FileUtils.getTestResourceDir() + "mapper/");
	}
}
